<?php
echo <<<EOT
<?php
/** @var {$this->modelClass}Controller \$this */
/** @var {$this->modelClass} \$model */

\$this->pageTitle = '查看{$this->modelName}'; \n
EOT;

$nameColumn = $this->guessNameColumn($this->tableSchema->columns);
$label = $this->pluralize($this->class2name($this->modelClass));
echo "\$this->breadcrumbs=array(
	'{$this->modelName}'=>array('index'),
	\$model->{$nameColumn},
);\n";
?>

$this->menu=array(
	array('label'=>'创建<?php echo $this->modelName; ?>','url'=>array('create')),
	array('label'=>'更新<?php echo $this->modelName; ?>','url'=>array('update','id'=>$model-><?php echo $this->tableSchema->primaryKey; ?>)),
	array('label'=>'删除<?php echo $this->modelName; ?>','url'=>'#','linkOptions'=>array('submit'=>array('delete','id'=>$model-><?php echo $this->tableSchema->primaryKey; ?>),'confirm'=>'确定要删除这个数据吗？')),
);
?>
<div class="page-header">
	<h1>查看<?php echo $this->modelName . " #<?php echo \$model->{$this->tableSchema->primaryKey}; ?>"; ?></h1>

	<div class="btn-group pull-right">
		<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle"> 操作 <span class="caret"></span>
		</button>
		<?php echo
		<<<EOT
		<?php \$this->widget('bootstrap.widgets.TbDropdown', array(
			'items' => \$this->menu,
		))?>
		\n
EOT;
		?>
	</div>
</div>

<?php echo "<?php"; ?> $this->widget('bootstrap.widgets.TbDetailView',array(
	'data'=>$model,
	'attributes'=>array(
	<?php
	foreach ($this->tableSchema->columns as $column) {
		echo "\t\t'" . $column->name . "',\n";
	}
	?>
	),
)); ?>
